package com.example.pt.enums;

/**
 * 推荐反馈类型枚举
 */
public enum FeedbackType {
    NOT_INTERESTED(0, "不感兴趣"),
    LOW_QUALITY(1, "内容低质"),
    REPEATED(2, "重复推荐"),
    OTHER(3, "其他原因");

    private final int value;
    private final String description;

    FeedbackType(int value, String description) {
        this.value = value;
        this.description = description;
    }

    public int getValue() {
        return value;
    }

    public String getDescription() {
        return description;
    }

    /**
     * 根据值获取枚举
     * @param value 枚举值
     * @return 对应的枚举实例
     */
    public static FeedbackType fromValue(int value) {
        for (FeedbackType type : FeedbackType.values()) {
            if (type.getValue() == value) {
                return type;
            }
        }
        return OTHER; // 默认返回其他原因
    }
} 